home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group03a.txt / 000043_icon-group-sender_Tue Mar 25 12:29:33 2003.msg < prev    next >
Internet Message Format  |  2003-12-22  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2PJSvM11424
  4.     for icon-group-addresses; Tue, 25 Mar 2003 12:28:57 -0700 (MST)
  5. Message-Id: <200303251928.h2PJSvM11424@baskerville.CS.Arizona.EDU>
  6. From: voice_of_reason@australia.edu (Quiet Voice)
  7. X-Newsgroups: comp.lang.icon
  8. Subject: newbie question -- ressurected
  9. Date: 25 Mar 2003 10:44:58 -0800
  10. X-Complaints-To: groups-abuse@google.com
  11. To: icon-group@cs.arizona.edu
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14.  
  15. Greetings:
  16.  
  17. Several years ago, I made a brief foray into trying to teach myself
  18. the ICON programming language and develop some text analysis software.
  19. After several fits-n-starts, the project sort of died on the vine.
  20.  
  21. I'm back at it again. Now, I'm trying to dig thru past code, remind
  22. myself of what it was supposed to do and how...and shake out the
  23. kinks.
  24.  
  25. I ran a piece of code this morning and discovered that it results in
  26. an infinite loop.....but I can't figure out why.
  27.  
  28. here is the code fragment:
  29.  
  30. while not((line := read(data)) == "") do every
  31. write(lettercount[!line] +:= 1)
  32.  
  33. {Note, this is one continuous line in the actual code}
  34. "data" is an input text file
  35.  
  36. >From some debugging I've done, it seems like it keep reading from the
  37. file after it reaches the end...it just loops back to the begining of
  38. the file and starts over again. But I don't figure out why.
  39.  
  40. What am I missing?
  41.  
  42. Assistance appreciated.
  43.  
  44. Thanks!!
  45.